package entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Guichet entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "guichet", schema = "public")
public class Guichet implements java.io.Serializable {

	// Fields

	private Integer id;
	private String adresse;
	private String operateur;
	private String username;
	private String password;
	private Set<Kit> kits = new HashSet<Kit>(0);
	private Set<Vente> ventes = new HashSet<Vente>(0);
	private Set<MontantCaisse> montantCaisses = new HashSet<MontantCaisse>(0);
	 
	// Constructors

	/** default constructor */
	public Guichet() {
	}

	/** full constructor */
	public Guichet(String adresse, String operateur, String username,
			String password, Set<Kit> kits, Set<Vente> ventes,
			Set<MontantCaisse> montantCaisses ) {
		this.adresse = adresse;
		this.operateur = operateur;
		this.username = username;
		this.password = password;
		this.kits = kits;
		this.ventes = ventes;
		this.montantCaisses = montantCaisses;
		 
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "adresse")
	public String getAdresse() {
		return this.adresse;
	}

	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}

	@Column(name = "operateur")
	public String getOperateur() {
		return this.operateur;
	}

	public void setOperateur(String operateur) {
		this.operateur = operateur;
	}

	@Column(name = "username")
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "password")
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "guichet")
	public Set<Kit> getKits() {
		return this.kits;
	}

	public void setKits(Set<Kit> kits) {
		this.kits = kits;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "guichet")
	public Set<Vente> getVentes() {
		return this.ventes;
	}

	public void setVentes(Set<Vente> ventes) {
		this.ventes = ventes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "guichet")
	public Set<MontantCaisse> getMontantCaisses() {
		return this.montantCaisses;
	}

	public void setMontantCaisses(Set<MontantCaisse> montantCaisses) {
		this.montantCaisses = montantCaisses;
	}

	 

}